package startup;

import controller.LoginController;
import controller.NetworkSetupController;

public class ClientRunner {
	static String username;
	
	public static void main(String[] args){
		init();	
	}
	
	public static void init(){
		try{
			Network.init();		
			new LoginController();
			
		}catch(Exception e){
			new NetworkSetupController();
		}
	}
	
	public static void setUsername(String s){
		username = s;
	}
	
	public static void exit(){
		try{
			Network.userBL.logout(username);
		}catch(Exception e){
			System.exit(0);
		}
		System.exit(0);
	}
}
